Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CDN URLs, add option for local libs and SRI attributes #962

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

kramred
Copy link

@kramred kramred commented Mar 1, 2019

Hello,

This pull request is a bunch of stuff that is related and introduces two new options:

  • --HTMLExporter.use_local_libs=<Bool> (Default: False)
  • --HTMLExporter.use_sri_attr=<Bool> (Default: False)

This allows you to create html output where resources are loaded from a local folder and/or hashes for the external resources are added within the tag loading the resource.

This (partially) addresses the following issues: #238 #754 #761 #763

The default behaviour is not changed (except for updated versions of the external resources)

Changes/additions

  • Update versions of external resources used (in slides.py still hardcoded)
    • jQuery 2.0.3 → jQuery 3.3.1
    • require.js 2.1.10 → require.js 2.3.6
    • reveal.js 3.5.0 → reveal.js 3.7.0
  • Created a template file for (eventually) all external resources urls.tpl in the templates/html folder
    • urls.tpl generates URLs for CDN (as they used to be hardcoded in full.tpl)
    • urls.tpl is imported in full.tpl and depending on the switches the variables are set
    • also generates alternative external URLs (not used yet…)
    • generates URLs for using local resources in the libs/ folder relative to your HTML output file
  • Small changes
    • update jinja url in docs

Open issues

  • Make options available as switches in the main command, probably in nbconvertapp.py
    • I couldn't get this to work (any help here would be appreciated)

@MSeal
Copy link
Contributor

MSeal commented Apr 4, 2019

I need someone more familiar with the js dependencies to take a look at this. Also tests indicate there's some an issue with the jinja template now: jinja2.exceptions.UndefinedError: parameter 'urls' was not provided

@willingc
Copy link
Member

Bumping to 6.0 release

@willingc willingc modified the milestones: 5.6, 6.0 Jul 29, 2019
@willingc willingc added status:need-maintainer-info Needs additional techncial information or review and removed help wanted labels Jul 29, 2019
@SylvainCorlay SylvainCorlay removed this from the 6.0 milestone Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:need-maintainer-info Needs additional techncial information or review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants